package com.rightsidetech.mall.dto.request.userApp;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.List;

@Data
public class OptCommodityReq implements Serializable {

    @ApiModelProperty(value = "商品id",required = true)
    @NotNull(message = "商品id不可为空")
    private Long commodityId;

    @ApiModelProperty(value = "规格")
    private String specs;

    @ApiModelProperty(value = "购买方式 0-直接购新 1-以旧换新",required = true)
    @NotNull(message = "购买方式不可为空")
    @Range(max = 1,min = 0,message = "购买商品的方式只有两种")
    private Byte manner;
}
